<?php
//------------------------
// 管理后台首页
//-------------------------

namespace app\admin\controller;

use app\common\controller\AdminBase;
use think\Loader;
use think\Session;
use think\Db;
use org\Auth;

class Index extends AdminBase
{
    public function index()
    {
       return $this->view->fetch();
    }

    /**
     * 欢迎页
     * @return mixed
     */
    public function welcome()
    {
        // $auth     = new Auth();
        $admin_id = Session::get('admin_id');
        // $abc = $auth->check('admin/AuthRule/index',$admin_id);
        // halt($abc);


        // 查询个人信息
        $info = Db::name("AdminUser")->where("id", $admin_id)->find();
        // halt($info);
        $this->assign("info", $info);

        return $this->fetch('welcome');
    }
}
